Bit-mapped displays in computer systems are becoming more prevalent, especially in the so-called engineering work stations where graphics, often in color play an important part in the work done by the computer. In a bit-mapped display a collection of memory known as a frame buffer contains one or more bits for each pixel (dot) to be displayed, usually on a CRT. For example, if the displayed image area were 1024 pixels wide by 1024 pixels high then 1,048,576 bits (per plane) would be needed as a frame buffer for a black and white display. In a color display there can be several planes in the frame buffer, so that each pixel can be described with a corresponding number of bits. These additional bits can be used to assign color and other attributes, such as intensity, depth, translucence, etc.
The bit-mapped architecture set out above is in distinct contrast with its simpler and less general predecessor, the alpha or character display. In those systems the display is limited to displaying the various characters of a predetermined character set. Each address of the frame buffer holds a character code for the character to be displayed at the corresponding location upon the display. Specially dedicated hardware takes care of converting the character to the correct sequence of pixels. In a raster scan display for seven by nine pixel characters, for instance, the character code is accessed nine times to find the pixels needed for the nine consecutive scan lines that comprise the current line of characters. In a character oriented frame buffer it is generally permissible to rearrange or edit the display through firmware manipulation of the contents of the frame buffer. This is achieveable because the number of addresses in the frame buffer is small, and the whole frame buffer can, if necessary, be rewritten in a relatively short period of time. Thus, a scrolling operation in a character oriented frame buffer requires only firmware and no extra hardware to achieve acceptable performance.
No such simplicity attaches to bit-mapped displays, unfortunately. Therein is simply too much memory for the firmware to manage by rewriting the frame buffer as a whole. To move segments or parts of the displayed information from one location of the display to another, or to perform some uniform operation upon all the pixels within a bounded area of the display, requires some hardware assistance if it is to occur at acceptable speeds. As an added consideration, some systems where a graphics capability is standard dispense altogether with a character oriented frame buffer in favor of simply putting the character pixels for an alpha type display into the bit-mapped frame buffer, as if they were just so much graphics information, anyway. This saves memory, but it makes it absolutely necessary to have some sort of hardware bit-mover available if one is to be able to scroll through a displayed program listing with the same speed as possible with the older alpha-only type displays.
It is common for a bit-mapped display to have a hardware assistance circuit to increase performance relating to editing or manipulating the information presented in the display. That is, for assistance in rearranging the bits in the frame buffer. One common such circuit is the so-called "barrel mover." These are switching circuits that allow a parallel presentation of bits representing adjacent pixels on a scan line to be shifted with respect to the boundaries of the parallel representation and then stored into a different location in the frame buffer. The "parallel presentation" is usually something like sixteen, thirty-two or perhaps sixty-four bits, and represents a data path to and from the frame buffer. In operation a barrel shifter reads, say, a sixteen bit segment of a scan line and shifts it some specified amount before writing it back into a different segment of a different scan line. The shifting misaligns the ends of the shifted segment with respect to the fixed boundaries of the data path; bits shifted "past the end" of the fixed segment boundaries are saved for use in the next read-shift-write operation. Such saved bits from the previous read-shift-save operation are combined with the "hole" created by the shifting of the newly read and shifted bits for the next operation.
A barrel mover is fast and requires only a minimum of supervisory attention from the firmware. But it is a complicated circuit and is expensive. In a color graphics application one barrel mover is needed for each plane in the frame buffer. This means that a high performance color graphics display can be very complicated and expensive.
Thus, at at one extreme there is the low cost possibility of using only firmware to manipulate the display, and at another extreme is an expensive and complicated barrel mover. It would be desirable if there were a way to approach the performance of a barrel mover without incurring the cost of one.
Such an advantageous combination is achieved by the present invention where two shift registers, a simple single bit ALU and a control circuit are combined to automatically move an arbitrary segment of a scan line to an arbitrary location in another scan line. A segment or a portion thereof of consecutive pixels from the source location are read in parallel into a source data shift register. A corresponding segment or portion thereof of consecutive pixels from the destination may be parallel loaded into a destination data shift register if a replacement rule operation is to be performed. (That is, if the source data is to be somehow combined with the destination data, rather than simply replacing it.) The pixels are simultaneously and synchronously shifted out of each shift register and presented to the ALU, where they are combined and the result shifted back into the destination data shift register. As far as the destination data shift register is concerned, the modified collection of pixels from the ALU is shifted "in the front," so to speak, as the unmodified pixels are shifted "out the back." Once the destination data shift register contains the complete new or modified segment or portion thereof, those pixels are written to the destination address in the frame buffer, and the process continues, if necessary.
In the present embodiment a field of sixty-four pixels can be read, shifted and combined and then written as a "unit operation." The width of the segment to be moved can be larger, and its width is specified (in pixels) by the window width portion of the "window width/# of lines" register. If the segment to be moved is wider than sixty-four pixels the control circuit will automatically continue the unit operation of reading, shifting and writing until the entire segment has been moved. A "number of lines" portion of that same register will cause an automatic repetition of the same sequence of unit operations, save that they are done with source and destination scan lines that are each adjacent the scan lines previously operated upon.
Moves can start at any pixel on a source scan line and can be to any pixel in the destination scan line. Corresponding source and destination pixels that have differing locations within their respective sixty-four pixel fields are accommodated by a preliminary "closed loop" shifting of the destination shift register. This undoes the offset between the source and destination segments insofar as they appear in the shift registers. If several fields are processed to handle a large segment of a scan line the reads into the source data shift register and writes from the destination data shift register will be staggered in time.